﻿<%@ Page Language="C#" AutoEventWireup="true"  Inherits="Evan.WebUI.ManagerPage" ValidateRequest="false"  %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Linq" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

<%
    string filed = Evan.Common.CommFun.GetQueryString("list");
    filed = System.Web.HttpUtility.UrlDecode(filed);
    //Response.Write(filed);
    //{"Field":"title","Head":"标题","Type":"input","Tip":"这是字段提示","Default":""}
    var flist = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(filed, new[] { new { Field = "", Head = "", Type = "", Tip = "", Default = "" } }.ToList());

    
    //Evan.Model.ConvertModel.ConvertToDynamic(filed);

%>

<!DOCTYPE html>

<%="<!--[if IE 8]> <html class=\"ie8 no-js\"> <![endif]-->"%>
<%="<!--[if IE 9]> <html class=\"ie9 no-js\"> <![endif]-->"%>
<%="<!--[if !IE]><!-->"%>
<html>
<%="<!--<![endif]-->"%>
<!-- BEGIN HEAD -->

<head>
    <meta charset="utf-8" />
    <title><%=Evan.Common.CommFun.GetAppSetting("AdminTitle") %> - 后台管理系统</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <!-- #include file="../../include/com_res_css.inc" -->
    <style type="text/css" >
        html {
            background: white !important;
        }
        .page-content {
            margin-left:0px !important;
            min-width:100% !important;
            min-height:503px !important;
        }
        .page-container {
            margin-top:0px !important;
        }
        .form-group:last-child {
            border-bottom:none !important;
        }
    </style>
</head>
<!-- END HEAD -->

<body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
    <!-- BEGIN HEADER -->

    

    <!-- END HEADER -->
    <!-- BEGIN HEADER & CONTENT DIVIDER -->
    <div class="clearfix"></div>
    <!-- END HEADER & CONTENT DIVIDER -->
    <!-- BEGIN CONTAINER -->
    <div class="page-container">
        <!-- BEGIN SIDEBAR -->

        

        <!-- END SIDEBAR -->
        <!-- BEGIN CONTENT -->
        <div class="page-content-wrapper">
            <!-- BEGIN CONTENT BODY -->
            <div class="page-content">
                
                <div class="portlet light bordered">
                    
                    <div class="tab-content">

                        <div class="tab-pane active" id="tab_1">
                            <div class="form">
                                <div class="form-horizontal form-row-seperated">
                                    <div class="form-body">
                                        
                                        <%

                                            foreach (var item in flist)
                                            {
                                                Evan.Model.SysModel.HtmlHelperModel hhm = new Evan.Model.SysModel.HtmlHelperModel { Title = item.Head, PlaceHoder = item.Tip, Notice = item.Tip, FieldName = item.Field, FieldVerify = "", MaxLength = 0, FieldType = item.Type, DefaultValue=item.Default };
                                                Response.Write(Evan.Common.HtmlHelper.HtmlBuild(hhm));
                                            }

                                        %>
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                         
                    </div>

                </div>


                <!-- END PAGE CONTENT-->
            </div>
            <!-- END CONTENT BODY -->
        </div>
        <!-- END CONTENT -->

    </div>
    <!-- END CONTAINER -->
    
    <!-- #include file="../../include/com_res_js.inc" -->

    <!-- feditor文件 -->
    <link rel="stylesheet" href="../../assets/feditor/css/loadfeditor.css"  />
    <script type="text/javascript" src="../../assets/feditor/js/loadfeditor.js"></script>

    <script type="text/javascript">
        //console.log(window.parent.fieldList_Json);
        function getcmodel() {
            var cmodel = MakeModel();
            for (var p in cmodel) {
                cmodel[p] = StrDeCode(cmodel[p]);
            }
            return cmodel;
        }

        function setcmodel() {
            if (window.parent.fieldList_Json.action == "edit") {
                //console.log(window.parent.fieldList_Json.data);
                SetModel(window.parent.fieldList_Json.data);
            }
        }
        setcmodel();
    </script>

</body>

</html>
